<?php

namespace AppBundle\Exception;

/**
 * Description of ServiceException
 *
 * @author yihao
 */
class ServiceException extends \Exception
{
    
    protected $transMessage;
    
    protected $transParams;
    
    protected $customCode;
    
    public function __construct($message = '', $transMessage = '', array $transParams = array(), $customCode = '3999')
    {
        parent::__construct($message);
        
        $this->transMessage = $transMessage;
        $this->transParams = $transParams;
        $this->customCode = $customCode;
    }
    
    public function getTransMessage()
    {
        return $this->transMessage;
    }
    
    public function setTransMessage($transMessage)
    {
        $this->transMessage = $transMessage;
        return $this;
    }
    
    public function getTransParams()
    {
        return $this->transParams;
    }
    
    public function setTransParams($transParams)
    {
        $this->transParams = $transParams;
        return $this;
    }
    
    public function getCustomCode()
    {
        return $this->customCode;
    }
    
    public function setCustomCode($customCode)
    {
        $this->customCode = $customCode;
        return $this;
    }
    
}
